<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>新巴巴运动网-电子商城</title>
<link rel="stylesheet" href="/res/css/style.css" />
<script src="/res/js/jquery.js"></script>
<script src="/res/js/com.js"></script>
<!-- <script type="text/javascript">
//登陆
function login(){
	//登录成功后，返回登录之前的页面
	window.location.href = "/shopping/login.shtml?returnUrl=" + window.location.href;
}
//退出
function logout(){
	//退出成功后，返回登录之前的页面
	window.location.href= "/shopping/logout.shtml?returnUrl=" + window.location.href;
}

//我的订单
function myOrder(){
	window.location.href="/buyer/index.shtml";
}
</script> -->
<script type="text/javascript">
	//重置筛选条件
	$(function(){
		//给filterRest标签绑定事件
		$("#filterRest").click(function(){
			//清除已选条件
			$("#selected_ondition").remove();
			//跳转到商品列表页面
			window.location.href = "/product/display/list.shtml";
		});
	});
	//去购物车结算
	function trueBuy(){
		window.location.href = "/buyer/trueBuy.shtml?returnUrl=http://localhost:8080/shopping/buyCart.shtml";
	}
	//删除
	function delProduct(skuId){
		if(confirm("你确定要删除吗？")){
			window.location.href = "/shopping/deleteItem.shtml?skuId=" + skuId + "&type=1";
		}
	}
</script>
</head>
<body>
<%-- <div class="bar"><div class="bar_w">
	<p class="l">
		<span class="l">
			收藏本网站！北京<a href="#" title="更换">[更换]</a>
		</span>
	</p>
	<ul class="r uls">
	<li class="dev">您好,欢迎来到新巴巴运动网！</li>
	<c:if test="${!isLogin }">
		<li class="dev"><a href="javascript:void(0)" onclick="login()"  title="登陆">[登陆]</a></li>
		<li class="dev"><a href="javascript:void(0)" onclick="register()" title="免费注册">[免费注册]</a></li>
	</c:if>
	<c:if test="${isLogin }">
		<li class="dev"><a href="javascript:void(0)" onclick="logout()" title="退出">[退出]</a></li>
		<li class="dev"><a href="javascript:void(0)" onclick="myOrder()" title="我的订单">我的订单</a></li>
	</c:if>
	<li class="dev"><a href="#" title="在线客服">在线客服</a></li>
	<li class="dev after"><a href="#" title="English">English</a></li>
	</ul>
</div></div> --%>
<jsp:include page="../contain/head.jsp"></jsp:include>
<div class="w loc">
	<div class="h-title">
		<div class="h-logo"><a href="http://localhost:8080"><img src="/res/img/pic/logo-1.png" /></a></div>
	    <div class="h-search">
	      	<input type="text" />
	        <div class="h-se-btn"><a href="#">搜索</a></div>
	    </div>
	</div>
	<dl id="cart" class="cart r">
		<dt><a href="#" title="结算">结算</a>购物车:<b id="">${buyCart.productAmount }</b>件</dt>
		<dd class="hidden">
			<p class="alg_c hidden">购物车中还没有商品，赶紧选购吧！</p>
			<h3 title="最新加入的商品">最新加入的商品</h3>
			<ul class="uls">
				<c:forEach items="${buyCart.items }" var="item">
				<li>
					<a class="pic" title="${item.sku.product.name}"><img alt="${item.sku.product.name}" src="${item.sku.product.img.allUrl }"></a>
					<p class="dt"><a title="${item.sku.product.name}" href="javascript:void(0)"> ${item.sku.product.name}--${item.sku.color.name}--${item.sku.size}</a></p>
					<p class="dd">
						<b><var>${item.sku.skuPrice }</var><span>x${item.amount }</span></b>
						<a href="javascript:void(0);" onclick="delProduct(${item.sku.id })" title="删除" class="del">删除</a>
					</p>
				</li>
			</ul>
			<p>共<b>${buyCart.productAmount }</b>件商品&nbsp;&nbsp;&nbsp;&nbsp;共计<b class="f20">${buyCart.productPrice }</b></p>
			</c:forEach>
			<div>
				<a href="#" onclick="trueBuy();" title="去购物车结算" class="inb btn120x30c">去购物车结算</a>
			</div>
		</dd>
	</dl>
</div>

<div class="w ofc">
	<div class="l wl">

		<jsp:include page="../contain/left.jsp"></jsp:include>

	</div>
	<div class="r wr">

		<jsp:include page="../contain/recommend.jsp"></jsp:include>

		<h2 class="h2 h2_filter mt"><em title="商品筛选">商品筛选</em><cite><a href="javascript:void(0);" id="filterRest" title="重置筛选条件">重置筛选条件</a></cite></h2>
			<ul class="uls filter">
				<c:if test="${flag }">
				<li id="selected_ondition"><label>已选条件：</label>
				<p class="sel">
					<c:forEach items="${query }" var="entry">
					<a href="javascript:void(0);">
					<em>${entry.key }：</em>${entry.value }
					<cite title="关闭此筛选条件">X</cite></a>
					</c:forEach>
				</p>
				</li>
				</c:if>
				<c:if test="${!empty brands }">
				<li><b>品牌：</b><p>
					<a href="javascript:void(0);" title="不限" class="here">不限</a>
					<c:forEach items="${brands }" var="brand">
						<a href="javascript:void(0);" title="${brand.name }" onclick="window.location.href='/product/display/list.shtml?brandId=${brand.id}&brandName=${brand.name}&typeId=${typeId}&typeName=${typeName}'">${brand.name }</a>
					</c:forEach>
				</p></li>
				</c:if>
				<li><b>价格：</b><p>
					<a href="javascript:void(0);" title="不限" class="here">不限</a>
					<a href="javascript:void(0);" title="1-99">0-79</a>
					<a href="javascript:void(0);" title="100-199">80-199</a>
					<a href="javascript:void(0);" title="200-499">200-299</a>
					<a href="javascript:void(0);" title="200-499">300-499</a>
					<a href="javascript:void(0);" title="200-499">500-599</a>
					<a href="javascript:void(0);" title="200-499">600以上</a>
				</p></li>
				<c:if test="${!empty types }">
				<li><b>类型：</b><p>
					<a href="javascript:void(0);" title="不限" class="here">不限</a>
					<c:forEach items="${types }" var="type">
						<a href="javascript:void(0);" title="${type.name }" onclick="window.location.href='/product/display/list.shtml?typeId=${type.id}&typeName=${type.name}&brandId=${brandId}&brandName=${brandName}'">${type.name }</a>
					</c:forEach>
				</p></li>
				</c:if>
				<li><b>材质：</b><p>
					<span><a href="javascript:void(0);" title="不限" class="here">不限</a></span>
					<c:forEach items="${features }" var="feature">
						<span><a href="javascript:void(0);" title="${feature.name }">${feature.name }</a></span>
					</c:forEach>
				</p></li>
				<li><b>适用人群：</b><p>
					<a href="javascript:void(0);" title="不限" class="here">不限</a>
					<a href="javascript:void(0);" title="男士">男士</a>
					<a href="javascript:void(0);" title="女士">女士</a>
					<a href="javascript:void(0);" title="儿童">儿童</a>
					<a href="javascript:void(0);" title="中性">中性</a>
				</p></li>
			</ul>
			<div class="sort_type">
				<a href="javascript:void(0);" title="销量" class="sales">销量</a>
				<a href="javascript:void(0);" title="价格" class="price">价格</a>
				<a href="javascript:void(0);" title="上架时间" class="time">上架时间</a>
			</div>
			<div class="mt ofc">
				<ul class="uls i_150x150 x4_150x150b">
					<c:forEach items="${pagination.list }" var="entry">
					<li>
						<%--<a href="javascript:void(0)" onclick="window.open('/html/product/${entry.id}.html')" title="${entry.name }" class="pic"><img src="${entry.img.allUrl }" alt="${entry.name }" /></a>--%>
						<a href="javascript:void(0)" onclick="window.open('/product/detail.shtml?id=${entry.id}')" title="${entry.name }" class="pic"><img src="${entry.img.allUrl }" alt="${entry.name }" /></a>
						<dl>
							<!-- dt 10个文字+... -->
							<dt><a href="javascript:void(0)" onclick="window.open('/product/detail.shtml?id=${entry.id}')" title="${entry.name }">${entry.name }</a></dt>
							<!-- dt 25个文字+... -->
							<dd class="h40">${entry.name }</dd>
							<dd class="orange">￥128.00</dd>
							<%--<dd>北京有货</dd>--%>
							<dd><a href="#" title="加入购物车" class="inb btn70x21 mr">加入购物车</a></dd>
						</dl>
						<%--<img src="/res/img/pic/hot.gif" alt="热门" class="type" />--%>
					</li>
					</c:forEach>
				</ul>
			<div class="page pb15">
				<span class="r inb_a page_b">
					<c:forEach items="${pagination.pageView }" var="page">
						${page }
					</c:forEach>
				</span>
			</div>
	</div>
</div>
</div>
<jsp:include page="../contain/buttom.jsp"></jsp:include>
</body>
</html>